package com.dishes.douguo.Controller;

import com.dishes.douguo.Service.imgesService;
import com.dishes.douguo.domain.Imges;
import com.dishes.douguo.util.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;

import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;



@Api(tags = "图片管理")
@RestController
@RequestMapping("/dishes/douguo/imges")
public class imgesController {

    @Autowired
    imgesService service;

    @ApiOperation("获取图片信息")
    @CrossOrigin
    @GetMapping("/getImgesInfo")
    public AjaxResult getimges(Integer imgId){
        System.out.println(imgId);
        Imges result = service.getimgesById(imgId);

        System.out.println("请求成功!");

            return  AjaxResult.success(result);
    }


}
